@extends('admin.layout')
@section('title',$title)
@section('content')
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                商品属性
                <small>商品属性修改</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 商品属性管理</a></li>
                <li class="active">商品属性修改添加</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <!-- left column -->
                <div class="col-md-12">
                    <!-- general form elements -->
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title">商品属性</h3>
                        </div><!-- /.box-header -->
                        <!-- form start -->
                        @if(session('error'))
                            {{session('error')}}
                        @endif
                        @if (count($errors) > 0)
                            <div class="alert alert-danger">
                                <ul>
                                    @foreach ($errors->all() as $error)
                                        <li>{{ $error }}</li>
                                    @endforeach
                                </ul>
                            </div>
                        @endif
                        
                        <form role="form" action="/admin/goodsattr/update" method="post" enctype="multipart/form-data">
                            {{ csrf_field() }}
                            <div class="box-body">
                                <div class="form-group">
                                    <label for="exampleInputEmail1">商品属性修改</label>
                                    <input type="text" name="name" value="{{ $data -> name }}" class="form-control" id="exampleInputEmail1"
                                           placeholder="请输入修改后的商品属性">
                                    <input type="hidden" name='id' value="{{ $data -> id }}"> 
                                    <br><br>

                                    <label>商品属性所属版块</label>
                                    <select name="cid" class="form-control">
                                        <option value="" disabled>{{$data -> catename}}</option>                         
                                    </select>      
                                </div>
                                            
                            </div><!-- /.box-body -->

                            <div class="box-footer">
                                <button type="submit" class="btn btn-primary">修改</button>
                                
                            </div>
                        </form>
                    </div><!-- /.box -->

                   
                </div><!--/.col (left) -->

            </div>   <!-- /.row -->
        </section><!-- /.content -->
    </div><!-- /.content-wrapper -->
@endsection
